home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club (Business) 1997 July / Software of the Month Club - Business (Volume 239) (July 1997).iso / pc / code / e.dxr / 00012_DriveQTLoop for E.ls < prev    next >
Encoding:
Text File  |  1996-02-15  |  830 b   |  23 lines

  1. global sQTSPRITE
  2.  
  3. on exitFrame
  4.   if the movieRate of sprite sQTSPRITE then
  5.     set movieTimePerZone to getaProp(getaProp(gObjects, #MapCarGasGauge), #movieTimePerZone)
  6.     set curFuelLevel to getaProp(getaProp(gObjects, #CarGasGauge), #fuelLevel)
  7.     set fuelBurned to getaProp(getaProp(gObjects, #MapCarGasGauge), #fuelLevel) - curFuelLevel
  8.     if (the movieTime of sprite sQTSPRITE / movieTimePerZone) > fuelBurned then
  9.       decrementGasGauge()
  10.     end if
  11.     go(the frame)
  12.   else
  13.     changeGasGauge(1, #true)
  14.     setaProp(getaProp(gObjects, #CarGasGauge), #fuelLevel, 0)
  15.     stopsound("E01drive.aif")
  16.     go("KeyFrame")
  17.     set objsToDel to [#transCarDashView, #carDashPict, #carMap]
  18.     DelObjects(objsToDel)
  19.     set the castNum of sprite sQTSPRITE to the number of cast "QTPlaceholder"
  20.     setSoundState(#play)
  21.   end if
  22. end
  23.